{{#if @button.href}}
    <a
        ...attributes
        class="btn {{this.additionalCssClass}}"
        href="{{@button.href}}"
        target="{{@button.target}}"
    >
        {{#if @button.tooltip}}
            <BsTooltip @title={{@button.tooltip}}/>
        {{/if}}
        {{@button.label}}
    </a>
{{else}}

    <BsButton
        ...attributes
        @type={{this.buttonType}}
        class="{{if @button.loading "oxi-btn-loading"}} {{this.additionalCssClass}}"
        @onClick={{this.click}}
        disabled={{@button.disabled}}
    >
        {{#if @button.tooltip}}
            <BsTooltip @title={{@button.tooltip}}/>
        {{/if}}
        {{@button.label}}
    </BsButton>

    {{#if @button.confirm}}
        <BsModal
            @open={{this.showConfirmDialog}}
            @closeButton={{true}}
            @fade={{true}}
            @backdrop={{true}}
            @backdropClose={{false}}
            @onHidden={{action "resetConfirmState"}}
            as |Modal|
        >
            <Modal.header>
                <h4 class="modal-title">
                    {{@button.confirm.label}}
                </h4>
            </Modal.header>
            <Modal.body>
                {{{@button.confirm.description}}}
            </Modal.body>
            <Modal.footer>
                <BsButton @onClick={{this.executeAction}} @type="primary">
                    {{if @button.confirm.confirm_label @button.confirm.confirm_label (t 'button.confirm_dialog.ok')}}
                </BsButton>
                <BsButton @onClick={{action Modal.close}}>
                    {{if @button.confirm.cancel_label @button.confirm.cancel_label (t 'button.confirm_dialog.cancel')}}
                </BsButton>
            </Modal.footer>
        </BsModal>
    {{/if}}
{{/if}}
